package com.jrx.anytxn.customer.service.impl;

import com.jrx.anytxn.customer.entity.CmLimitFrozeUseLog;
import com.jrx.anytxn.customer.mapper.ext.ExtCmLimitFrozeUseLogMapper;
import com.jrx.anytxn.customer.service.CmLimitFrozeUseLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class CmLimitFrozeUseLogServiceImpl implements CmLimitFrozeUseLogService {

    @Resource
    private ExtCmLimitFrozeUseLogMapper extCmLimitFrozeUseLogMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int insert(CmLimitFrozeUseLog record) {
        return extCmLimitFrozeUseLogMapper.insertSelective(record);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public CmLimitFrozeUseLog getLimitFrozeUseLogByUniqueKey(String tenantId, String customerId, String channel, String frozeNo, String paymentNo,
                                                             String useResumeFlag) {
        return extCmLimitFrozeUseLogMapper.getLimitFrozeUseLogByUniqueKey(tenantId, customerId, channel, frozeNo, paymentNo, useResumeFlag);
    }
}
